<?php
	$groups=db('auth_group')->where(['status'=>1])->select();
?>
<div class="x2">
	<ul class="list-group margin">
		<li class="">权限组</li>
		<?php
			$method=\think\Request::instance()->action();
			foreach($groups as $group){
			$class=(input('group_id')==$group['id'])?'text-main':'';
		?>
		<li><a class="<?=$class?>" href="{:url('admin/Auth/'.$method,['group_id'=>$group['id'],'group_name'=>$group['title']])}"><?=$group['title']?></a></li>
		<?php } ?>
	</ul>

	<ul class="list-group margin">
		<li>操作类型</li>
		<li><a class="<?=($method=='allotgroupaccess')?'text-main':''?>" href="{:url('admin/Auth/allotGroupAccess',['group_id'=>input('group_id'),'group_name'=>input('group_name')])}">权限分配</a></li>
		<li><a class="<?=($method=='allotgroupuser')?'text-main':''?>" href="{:url('admin/Auth/allotGroupUser',['group_id'=>input('group_id'),'group_name'=>input('group_name')])}">用户分配</a></li>
	</ul>
</div>

